import 'package:rfid/generated/json/base/json_convert_content.dart';
import 'package:rfid/entity/book_info_entity.dart';

BookInfoEntity $BookInfoEntityFromJson(Map<String, dynamic> json) {
	final BookInfoEntity bookInfoEntity = BookInfoEntity();
	final List<BookInfoList>? list = jsonConvert.convertListNotNull<BookInfoList>(json['list']);
	if (list != null) {
		bookInfoEntity.list = list;
	}
	return bookInfoEntity;
}

Map<String, dynamic> $BookInfoEntityToJson(BookInfoEntity entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['list'] =  entity.list?.map((v) => v.toJson()).toList();
	return data;
}

BookInfoList $BookInfoListFromJson(Map<String, dynamic> json) {
	final BookInfoList bookInfoList = BookInfoList();
	final String? isbn = jsonConvert.convert<String>(json['isbn']);
	if (isbn != null) {
		bookInfoList.isbn = isbn;
	}
	final String? mainTitle = jsonConvert.convert<String>(json['main_title']);
	if (mainTitle != null) {
		bookInfoList.mainTitle = mainTitle;
	}
	final String? mainTitlePy = jsonConvert.convert<String>(json['main_title_py']);
	if (mainTitlePy != null) {
		bookInfoList.mainTitlePy = mainTitlePy;
	}
	final String? subTitle = jsonConvert.convert<String>(json['sub_title']);
	if (subTitle != null) {
		bookInfoList.subTitle = subTitle;
	}
	final String? subTitlePy = jsonConvert.convert<String>(json['sub_title_py']);
	if (subTitlePy != null) {
		bookInfoList.subTitlePy = subTitlePy;
	}
	final String? serialTitle = jsonConvert.convert<String>(json['serial_title']);
	if (serialTitle != null) {
		bookInfoList.serialTitle = serialTitle;
	}
	final String? author = jsonConvert.convert<String>(json['author']);
	if (author != null) {
		bookInfoList.author = author;
	}
	final String? chiClassify = jsonConvert.convert<String>(json['chi_classify']);
	if (chiClassify != null) {
		bookInfoList.chiClassify = chiClassify;
	}
	final String? subject = jsonConvert.convert<String>(json['subject']);
	if (subject != null) {
		bookInfoList.subject = subject;
	}
	final String? publisher = jsonConvert.convert<String>(json['publisher']);
	if (publisher != null) {
		bookInfoList.publisher = publisher;
	}
	final String? publishAddr = jsonConvert.convert<String>(json['publish_addr']);
	if (publishAddr != null) {
		bookInfoList.publishAddr = publishAddr;
	}
	final String? publishDate = jsonConvert.convert<String>(json['publish_date']);
	if (publishDate != null) {
		bookInfoList.publishDate = publishDate;
	}
	final String? price = jsonConvert.convert<String>(json['price']);
	if (price != null) {
		bookInfoList.price = price;
	}
	final String? language = jsonConvert.convert<String>(json['language']);
	if (language != null) {
		bookInfoList.language = language;
	}
	final String? pages = jsonConvert.convert<String>(json['pages']);
	if (pages != null) {
		bookInfoList.pages = pages;
	}
	final String? spec = jsonConvert.convert<String>(json['spec']);
	if (spec != null) {
		bookInfoList.spec = spec;
	}
	final String? version = jsonConvert.convert<String>(json['version']);
	if (version != null) {
		bookInfoList.version = version;
	}
	final String? volume = jsonConvert.convert<String>(json['volume']);
	if (volume != null) {
		bookInfoList.volume = volume;
	}
	final String? summary = jsonConvert.convert<String>(json['summary']);
	if (summary != null) {
		bookInfoList.summary = summary;
	}
	final String? attachment = jsonConvert.convert<String>(json['attachment']);
	if (attachment != null) {
		bookInfoList.attachment = attachment;
	}
	final String? notes = jsonConvert.convert<String>(json['notes']);
	if (notes != null) {
		bookInfoList.notes = notes;
	}
	final String? coverBase64 = jsonConvert.convert<String>(json['cover_base64']);
	if (coverBase64 != null) {
		bookInfoList.coverBase64 = coverBase64;
	}
	final String? coverFileExt = jsonConvert.convert<String>(json['cover_file_ext']);
	if (coverFileExt != null) {
		bookInfoList.coverFileExt = coverFileExt;
	}
	return bookInfoList;
}

Map<String, dynamic> $BookInfoListToJson(BookInfoList entity) {
	final Map<String, dynamic> data = <String, dynamic>{};
	data['isbn'] = entity.isbn;
	data['main_title'] = entity.mainTitle;
	data['main_title_py'] = entity.mainTitlePy;
	data['sub_title'] = entity.subTitle;
	data['sub_title_py'] = entity.subTitlePy;
	data['serial_title'] = entity.serialTitle;
	data['author'] = entity.author;
	data['chi_classify'] = entity.chiClassify;
	data['subject'] = entity.subject;
	data['publisher'] = entity.publisher;
	data['publish_addr'] = entity.publishAddr;
	data['publish_date'] = entity.publishDate;
	data['price'] = entity.price;
	data['language'] = entity.language;
	data['pages'] = entity.pages;
	data['spec'] = entity.spec;
	data['version'] = entity.version;
	data['volume'] = entity.volume;
	data['summary'] = entity.summary;
	data['attachment'] = entity.attachment;
	data['notes'] = entity.notes;
	data['cover_base64'] = entity.coverBase64;
	data['cover_file_ext'] = entity.coverFileExt;
	return data;
}